package com.star.rpc.fault.retry;

import com.star.rpc.spi.SpiLoader;

/**
 * packageName com.star.rpc.fault.retry
 *
 * @author zerostart
 * @className RetryStrategyFactory
 * @date 2024/12/11
 * @description
 */
public class RetryStrategyFactory {
    static {
        SpiLoader.load(RetryStrategy.class);
    }

    /**
     * 默认重试器
     */
    private static final RetryStrategy DEFAULT_RETRY_STRATEGY = new NoRetryStrategy();


    public static RetryStrategy getInstance(String key) {
        return SpiLoader.getInstance(RetryStrategy.class, key);
    }
}
